import { Body, Controller, Post, Req } from '@nestjs/common';
import { WaterBillsService } from './water-bills.service';
import PageDto from './dto/page.dto';
import { DtoPipe } from '../../pipe/dto/dto.pipe';
import { ResponseUtilService } from '@app/response-util';

@Controller('waterBills')
export class WaterBillsController {

    constructor(
        private readonly service:WaterBillsService
    ){}


    @Post('page')
    async page(@Body(new DtoPipe({skipMissingProperties : true})) dto:PageDto, @Req() req) {
        const result = await this.service.page(dto)

        return ResponseUtilService.successRes(result)

    }
}
